import request from '@/utils/request'
// 获取列表
export const getCarRuleAPI = (params) => {
  return request({
    url: '/parking/rule/list',
    params
  })
}
// 添加规则
export const addCarRuleAPI = (data) => {
  return request({
    url: '/parking/rule',
    method: 'POST',
    data
  })
}
// 删除规则
export const deleteCarRuleAPI = (id) => {
  return request({
    url: `/parking/rule/${id}`,
    method: 'DELETE'
  })
}

// 规则详情
export const getCarRuleDetailAPI = (id) => {
  return request({
    url: `/parking/rule/${id}`
  })
}
// 编辑规则
export const editCarRuleAPI = (data) => {
  return request({
    url: '/parking/rule',
    method: 'PUT',
    data
  })
}
